<template>
  <el-breadcrumb separator-class="el-icon-arrow-right">
    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
    <el-breadcrumb-item
      v-for="(item, index) in breadcrumbList"
      :key="'breadcrumb' + index"
      :to="item.url ? { path: item.url } : null"
    >
      {{ item.name }}
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>

<script>
export default {
  name: 'CustomBreadcrumb',
  props: {
    breadcrumbList: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  data() {
    return {};
  },
};
</script>

<style lang="scss" scoped></style>
